home *** CD-ROM | disk | FTP | other *** search
-
- /* Generated by Interface Builder */
-
- // Shows how many pacs are left in the game... a very simple view
- // subclass that just draws 0-6 Pacs on the screen.
-
- #import <appkit/View.h>
-
- #define PAC_SIZE 16 // pixels square
-
-
- @interface PlayerUpView:View
- {
- id pacs; // NXImage of the various Pac shapes
-
- int numUp; // How many pacs the player has left
- }
-
- - initFrame:(const NXRect *)frm; // initialize instance
- - drawSelf:(NXRect *)rects :(int)rectCount; // standard rendering method
- - setNumUp:(int)num; // set number of pacs left
- - incPacs; // add another pac to the bunch
- - (int)pacs; // return # pacs left
- - (BOOL)nextPac; // if pacs left, decrement # pacs and return YES.
- // returns NO if no pacs left.
-
- @end
-